
<include file="Public:header"/><body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
   <div class="nav">
		<ul class="cc">
			<li><a href="/Admins/News/index/">新闻信息</a></li>
			<li class="current"><a href="/Admins/News/add/">添加新闻</a></li>
		</ul>
	</div>
	<form method="post" class="J_ajaxForm" enctype="multipart/form-data" action="{:U("News/add")}" >
		<input type="hidden" name="status" value="1">
		<div class="J_tabs_contents">
			<div>
				<div class="h_a">信息添加(带红色框为必填项)</div>
					 <div class="table_full">
					 	   
						<table width="100%" class="table_form ">
							<tr>
								<th width="100">所属栏目：</th>
								<td>
									<select name="cateid1" id="fid">
										<option value="">选择分类</option>
										<foreach name="classlist" item="vo">
											<option value="{$vo.id}">{$vo.name}</option>
										</foreach>
									</select>
									&nbsp;&nbsp;
									<select name="cateid2" id="toclass">
										<option value="">选择分类</option>
									</select>
								</td>
							</tr>
							
							<tr>
								<th>信息标题：</th>
								<td><input type="text" name="title" class="input require" size="50" value=""></td>
							</tr>
							
							<tr>
								<th>新闻主图片：</th>
								<td><Form function="images" parameter="image,image,'',news"/><span class="gray"> 双击可以查看图片！(178x120)</span></td>
							</tr>
							<tr>
								<th>信息简介：</th>
								<td><textarea name="summary" cols="80" rows="10"></textarea></td>
							</tr>
							<tr>
								<th>信息内容：</th>
								<td><script type="text/plain" id="content" name="content"></script><Form function="editor" parameter="content,full,$data['content'],news"/></td>
							</tr>
							<tr>
								<th>排序：</th>
								<td><input type="text" name="sort" class="input" size="10" value="0" /></td>
							</tr>
							<tr>
								<th>推荐:</th>
								<td><select name="iftj">
								<option value="1">推荐</option>
								<option value="0" selected>不推荐</option>
								</select>
								</td>
							</tr>
						
						</table>
					 </div>
			
			</div>
        </div>
		<div class="btn_wrap">
			  <div class="btn_wrap_pd">
					<button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">提交</button>
			  </div>
		</div>
	</form>
</div>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript" src="__JS__/content_addtop.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#fid").change(function(){
		 var id = $(this).val();
		 if(id == ''){
			$("#toclass option").remove();
			$("#toclass").append("<option value=''>选择分类</option>");
		 }else{
		 	$.get("/Admins/News/ajax/id/"+id, function(result){
				if(result != 'no'){
					$("#toclass option").remove();
					$("#toclass").append(result);
				}
			  });
		 	
		 }
  });
});
</script>

</body>
</html>